package com.whl.sm.model.notice;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 
 * </p>
 *
 * @author wuhaolun
 * @since 2021-11-17
 */
@Data
@NoArgsConstructor
public class UserCpNotice {

    private static final long serialVersionUID = 1L;


    public UserCpNotice(String noticeId,String userId){
        this.noticeId = noticeId;
        this.userId = userId;
    }

    @TableId(type = IdType.ASSIGN_UUID)
    private String id;

    /**
     * 公告id
     */
    private String noticeId;

    /**
     * 用户id
     */
    private String userId;

    /**
     * 阅读状态1:已读0:未读
     */
    private Integer readStatus;

    /**
     * 阅读时间
     */
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date readTime;

    /**
     * 用户角色类型
     */
    private String roleTypeId;


    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date createTime;


    /**
     * 逻辑删除
     */
    private Integer isDel;


    /**
     * ==========非数据库字段============
     */

    /**
     * 关联公告标题
     */
    @TableField(exist = false)
    private String noticeTitle;


    /**
     * 关联公告内容
     */
    @TableField(exist = false)
    private String noticeContent;



}
